home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
334_02
/
scanf.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-02-04
|
254 b
|
13 lines
#include <stdio.h>
main()
{
float x,y;
sscanf("0 12", "%f %f\n", &x, &y);
printf("%f, %f should be %f, %f\n", x, y, 0., 12.);
sscanf("00 12", "%f %f\n", &x, &y);
printf("%f, %f should be %f, %f\n", x, y, 0., 12.);
}